﻿#pragma once
#include <string>
#include "singleton.hpp"
#include <fstream> 
#include <vector>

using namespace std;

class AsyncExecutor;
class write_log
{
public:
	sigletonclass(write_log);

	std::vector<std::string> getLogFiles(const std::string& directory);

	
	void init(string path);

	void log_out(const string& content);
	void log_out(const string& level, const string& info);
	void del_log(std::vector<std::string> &files);
private:
	write_log()
	{

	}


	string path_;
	void clear_log();
	ofstream log_file_;

	shared_ptr<AsyncExecutor> async_exe_;
	
};